package org.dawning.shop.core.base.service;

import org.dawning.shop.core.base.BaseResult;

/**
 * Created by L on 2017/6/14.
 * 服务基类
 */
public abstract class BaseService
{

    /**
     * 400错误
     * @param message
     * @return
     */
    protected BaseResult return400(String message){
        return new BaseResult(400, message, null);
    }

    /**
     * 500错误
     * @param message
     * @return
     */
    protected BaseResult return500(String message){
        return new BaseResult(500, message, null);
    }

    /**
     * 200正常
     * @param message
     * @return
     */
    protected BaseResult return200(String message,Object o){
        return new BaseResult(200, message, o);
    }


}
